﻿<%@ Page Language="C#" CodeBehind="Gallery.aspx.cs" Inherits="d3PrtDgn.Web.Gallery"
	MasterPageFile="~/Web/d3PrtDgnTemplate.Master" %>

<%@ Register TagPrefix="ctl" TagName="CategoryList" Src="~\Controls\CategoryList.ascx" %>
<asp:Content ID="body" ContentPlaceHolderID="body" runat="server">
    <h2><asp:Label runat="server" ID="lblHeader" /></h2>
	<div class="photos">
	    <asp:TreeView runat="server" ID="catList" OnSelectedNodeChanged="ShowCategory">
		    <DataBindings>
			    <asp:TreeNodeBinding TextField="Name" ValueField="Id" />
		    </DataBindings>
	    </asp:TreeView>
		<asp:Repeater runat="server" ID="repAlbums">
			<ItemTemplate>
				<div class="album">
					<a href='Album.aspx?album=<%#DataBinder.Eval(Container.DataItem, "Abbreviation")%>'>
						<span><%#DataBinder.Eval(Container.DataItem, "Name")%></span>
						<img alt='<%#DataBinder.Eval(Container.DataItem, "Name")%>' src='/Photos/Thumb/user<%#DataBinder.Eval(Container.DataItem, "Owner.Id")%>/<%#DataBinder.Eval(Container.DataItem, "Photos[0].Filename")%>' />
					</a>
				</div>
			</ItemTemplate>
		</asp:Repeater>
		<div class="cleaner">&#160;</div>
	</div>
</asp:Content>
<asp:Content ID="bodyAfter" ContentPlaceHolderID="bodyAfter" runat="server">
	<ctl:CategoryList runat="server" />
</asp:Content>
